//
//  StartWorkViewController.m
//  TeamInformatization
//
//  Created by bigger on 2019/4/5.
//  Copyright © 2019年 SPIC. All rights reserved.
//

#import "StartWorkViewController.h"
#import "TakePhotoRecordingView.h"

@interface StartWorkViewController ()

@end

@implementation StartWorkViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self showTitleBarWithTitle:@"上岗到位" leftButtonStyle:Base_NavigationBar_Back rightButtonStyle:Base_NavigationBar_None];
    
    
    // UI
    [self loadShowViews];
}

// UI
- (void)loadShowViews
{
    UIScrollView * bgScrollView = [[UIScrollView alloc] init];
    bgScrollView.backgroundColor = kCommonBGGaryColor;
    bgScrollView.bounces = NO;
    bgScrollView.showsVerticalScrollIndicator = NO;
    bgScrollView.userInteractionEnabled = YES;
    bgScrollView.contentSize = CGSizeMake(kScreenWidth, kScreenHeight * 2);
    [self.view addSubview:bgScrollView];
    [bgScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(kSafeAreaTopHeight);
        make.left.right.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
    }];
    
    UIView *bgTitleView = [[UIView alloc] init];
    bgTitleView.backgroundColor = [UIColor whiteColor];
    [bgScrollView addSubview:bgTitleView];
    [bgTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.mas_equalTo(0);
        make.size.mas_equalTo(CGSizeMake(kScreenWidth, 47 * kScaleWidth));
    }];
    
    SimpleLabel *titleLabel = [SimpleLabel initWithText:@"人员上岗:" TextColor:kTitleTextColor TextFont:kFont(PFSCRegular, 15) TextAlignment:NSTextAlignmentLeft];
    [bgTitleView addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15 * kScaleWidth);
        make.top.mas_equalTo(0);
        make.height.mas_equalTo(47 * kScaleWidth);
    }];
    
    // 分割线
    UILabel *lineLabel = [[UILabel alloc] init];
    lineLabel.backgroundColor = kCuttingLineColor;
    [bgTitleView addSubview:lineLabel];
    [lineLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(0);
        make.left.mas_equalTo(15 * kScaleWidth);
        make.right.mas_equalTo(-15 * kScaleWidth);
        make.height.mas_equalTo(0.5);
    }];
    
    
    TakePhotoRecordingView *workView = [[TakePhotoRecordingView alloc] init];
    [bgScrollView addSubview:workView];
    [workView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(bgTitleView.mas_bottom);
        make.left.mas_equalTo(0);
        make.width.mas_equalTo(kScreenWidth);
    }];
    
}


#pragma -导航栏 两边按钮操作
-(void)baseNavigationBarLeftButtonClick:(UIButton *)button
{
    [self.navigationController popViewControllerAnimated:YES];
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
